Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 3 - Window Manager Reference / Window Manager Functions


Defining Your Own Window Definition Function

A window definition function determines how a menu generally looks and behaves. Various Window Manager functions call a window definition function whenever they need to perform a window-dependent action, such as drawing the window on the screen.

The Window Manager calls the Resource Manager to access your window definition function with the given resource ID; see "Window Definition IDs" for a description of how window definition IDs are derived from resource IDs and variation codes. You can define your own window variation codes so that you can use one 'WDEF' resource to handle several variations of the same general window.

The Resource Manager reads your window definition function into memory and returns a handle to it. The Window Manager stores this handle in the windowDefProc field of the window structure. Later, when it needs to perform an action on the window, the Window Manager calls the window definition function and passes it the variation code as a parameter.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998